package com.tlw.practice.tlw.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tlw.practice.tlw.pojo.dto.UserDto;
import lombok.AllArgsConstructor;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

import com.tlw.practice.tlw.annotation.annotations.PropertyMsg;
import lombok.NoArgsConstructor;
import lombok.NonNull;

@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "t_ru_leave")
public class LeaveEntity {
    @Id
    private String id;

    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @PropertyMsg("请假申请时间")
    private Date leaveTime;
    @PropertyMsg("请假类型")
    private String leaveType;     // 1.公假  2.事假    3.病假 4.产假 5.年休假
    @PropertyMsg("请假原因")
    private String reason;

    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @PropertyMsg("请假开始时间")
    private Date leaveDateStart;

    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @PropertyMsg("请假结束时间")
    private Date leaveDateEnd;

    private String leaveTimeStart;
    private String leaveTimeEnd;

    private String nickname;
    private String userId;
    @PropertyMsg("请假单状态")
    private Integer state;

    private String leaveDays;
}
